#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :mall_bilibili.py
# @Time      :2023/11/17 
# @Author    :CL
# @email     :1037654919@qq.com
# 爬取 ：https://mall.bilibili.com/#noReffer=true
import requests
import json


headers = {
    "authority": "www.biligo.com",
    "accept": "*/*",
    "accept-language": "zh-CN,zh;q=0.9",
    "cache-control": "no-cache",
    "content-type": "application/json",
    "origin": "https://www.biligo.com",
    "pragma": "no-cache",
    "referer": "https://www.biligo.com/list.html?noTitleBar=1&from=category_sb&category=1_107&scene=figure",
    "sec-ch-ua": "\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Google Chrome\";v=\"114\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Linux\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
}
url = "https://www.biligo.com/mall/noah/search/category/v2"
data = {
    "keyword": "",
    "filters": "",
    "priceFlow": "",
    "priceCeil": "",
    "sortType": "totalrank",
    "sortOrder": "",
    "pageIndex": 1,
    "userId": "",
    "state": "",
    "scene": "figure",
    "termQueries": [
        {
            "field": "category",
            "values": [
                "1_107"
            ]
        }
    ],
    "rangeQueries": [],
    "extra": []
}
data = json.dumps(data, separators=(',', ':'))
response = requests.post(url, headers=headers, data=data)

print(response.text)
print(response)